/**
 * Copyright (c) 2004-2015 All Rights Reserved.
 */
package com.zbest.zpay.cif.action;

import javax.annotation.Resource;

import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import com.zbest.zpay.shared.process.BaseAction;
import com.zbest.zpay.shared.process.ProcessResult;

/**
 * 
 *
 * @author czhou3306@gmail.com
 * @version $Id: LoginAction.java, v0.1 2015年12月5日 下午6:42:25 czhou3306@gmail.com Exp $
 */
@Service("loginAction")
public class LoginAction extends BaseAction {


    /** 
     * @see com.qiangungun.market.biz.shared.process.BaseAction#perform(com.qiangungun.market.common.model.ProcessResult)
     */
    @Override
    public void perform(ProcessResult processResponse) {/*

        LoginForm loginForm = (LoginForm) getValue(LoginForm.class.getSimpleName());

        Merchant merchant = merchantRepository.getByMobileNo(loginForm.getMobileNo());

        if (merchant == null) {
            throw new MarketException(MarketBizCodeEnum.MOBILE_NOT_REGISTER);
        }

        if (!StringUtils.equals(
            DigestUtils.md5Hex(loginForm.getLoginPassword() + merchant.getLoginPasswordSalt()),
            merchant.getLoginPassword())) {
            throw new MarketException(MarketBizCodeEnum.PASSWORD_ERROR);
        }

        processResponse.getResultObject().put(ContextField.KEY_MERCHANT, merchant);

    */}
}
